﻿namespace IFramework
{
    public class IntTransitionCondtion : TransitionCondtion<int>
    {

        public IntTransitionCondtion(string condtionName, object defaultVal, TransitionCondtionType condtionType) : base(condtionName, defaultVal, condtionType) { }

        public override void SetTransitionCondtionType(TransitionCondtionType condtionType)
        {
            this.condtionType = condtionType;
        }
        public override bool IsMetCondition()
        {
            switch (condtionType)
            {
                case TransitionCondtionType.SmallerThanDefalt:
                    return value < defaultValue;
                case TransitionCondtionType.BiggerThanDefalt:
                    return value > defaultValue;
                case TransitionCondtionType.EqualDefault:
                    return defaultValue != value;
                case TransitionCondtionType.NotEqualDefault:
                    return defaultValue == value;
                default:
                    return false;
            }
        }
    }
}